{
  "cells": [
    {
      "cell_type": "markdown",
      "id": "9970b371",
      "metadata": {
        "id": "9970b371"
      },
      "source": [
        "**user_message:**\n",
        "\n",
        "How can i use this dataset to train an AI that can tell me which cryptographic algorithm or which hash is used to encrypt a ciphertext"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 2,
      "id": "eb206353",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 553
        },
        "id": "eb206353",
        "outputId": "e2db6c28-7884-4fa7-d427-68054f30dcd4"
      },
      "outputs": [
        {
          "output_type": "error",
          "ename": "ParserError",
          "evalue": "Error tokenizing data. C error: EOF inside string starting at row 27440",
          "traceback": [
            "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[0;31mParserError\u001b[0m                               Traceback (most recent call last)",
            "\u001b[0;32m<ipython-input-2-1e0899a82276>\u001b[0m in \u001b[0;36m<cell line: 5>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      3\u001b[0m \u001b[0;31m# Load the dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0mfile_path\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'/content/test.csv'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0mdf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      6\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      7\u001b[0m \u001b[0;31m# Display the first few rows of the dataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py\u001b[0m in \u001b[0;36mread_csv\u001b[0;34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)\u001b[0m\n\u001b[1;32m    946\u001b[0m     \u001b[0mkwds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkwds_defaults\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    947\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 948\u001b[0;31m     \u001b[0;32mreturn\u001b[0m \u001b[0m_read\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilepath_or_buffer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    949\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    950\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py\u001b[0m in \u001b[0;36m_read\u001b[0;34m(filepath_or_buffer, kwds)\u001b[0m\n\u001b[1;32m    615\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    616\u001b[0m     \u001b[0;32mwith\u001b[0m \u001b[0mparser\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 617\u001b[0;31m         \u001b[0;32mreturn\u001b[0m \u001b[0mparser\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnrows\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    618\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    619\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/io/parsers/readers.py\u001b[0m in \u001b[0;36mread\u001b[0;34m(self, nrows)\u001b[0m\n\u001b[1;32m   1746\u001b[0m                     \u001b[0mcolumns\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1747\u001b[0m                     \u001b[0mcol_dict\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1748\u001b[0;31m                 \u001b[0;34m)\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m  \u001b[0;31m# type: ignore[attr-defined]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1749\u001b[0m                     \u001b[0mnrows\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1750\u001b[0m                 )\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/io/parsers/c_parser_wrapper.py\u001b[0m in \u001b[0;36mread\u001b[0;34m(self, nrows)\u001b[0m\n\u001b[1;32m    232\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    233\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlow_memory\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 234\u001b[0;31m                 \u001b[0mchunks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_reader\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_low_memory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnrows\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    235\u001b[0m                 \u001b[0;31m# destructive to chunks\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    236\u001b[0m                 \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_concatenate_chunks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mchunks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32mparsers.pyx\u001b[0m in \u001b[0;36mpandas._libs.parsers.TextReader.read_low_memory\u001b[0;34m()\u001b[0m\n",
            "\u001b[0;32mparsers.pyx\u001b[0m in \u001b[0;36mpandas._libs.parsers.TextReader._read_rows\u001b[0;34m()\u001b[0m\n",
            "\u001b[0;32mparsers.pyx\u001b[0m in \u001b[0;36mpandas._libs.parsers.TextReader._tokenize_rows\u001b[0;34m()\u001b[0m\n",
            "\u001b[0;32mparsers.pyx\u001b[0m in \u001b[0;36mpandas._libs.parsers.TextReader._check_tokenize_status\u001b[0;34m()\u001b[0m\n",
            "\u001b[0;32mparsers.pyx\u001b[0m in \u001b[0;36mpandas._libs.parsers.raise_parser_error\u001b[0;34m()\u001b[0m\n",
            "\u001b[0;31mParserError\u001b[0m: Error tokenizing data. C error: EOF inside string starting at row 27440"
          ]
        }
      ],
      "source": [
        "import pandas as pd\n",
        "\n",
        "# Load the dataset\n",
        "file_path = '/content/test.csv'\n",
        "df = pd.read_csv(file_path)\n",
        "\n",
        "# Display the first few rows of the dataset\n",
        "df.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "id": "49494a43",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "49494a43",
        "outputId": "19b325b7-5ffc-4d9a-f757-01fff3c89281"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "<class 'pandas.core.frame.DataFrame'>\n",
            "RangeIndex: 56000 entries, 0 to 55999\n",
            "Data columns (total 23 columns):\n",
            " #   Column                               Non-Null Count  Dtype  \n",
            "---  ------                               --------------  -----  \n",
            " 0   Ciphertext Length                    56000 non-null  int64  \n",
            " 1   Byte Frequency Distribution          56000 non-null  object \n",
            " 2   Byte Entropy                         56000 non-null  float64\n",
            " 3   N-gram Bigram Frequency              56000 non-null  float64\n",
            " 4   N-gram Trigram Frequency             56000 non-null  float64\n",
            " 5   Block Size Identification            56000 non-null  int64  \n",
            " 6   Padding Scheme Detection             0 non-null      float64\n",
            " 7   Cipher Mode Patterns                 0 non-null      float64\n",
            " 8   Key Length Identification            56000 non-null  int64  \n",
            " 9   Randomness Chi-Square                56000 non-null  float64\n",
            " 10  Randomness KS-Test                   56000 non-null  float64\n",
            " 11  Histogram of Byte Occurrences        56000 non-null  object \n",
            " 12  Bit-level Features                   56000 non-null  object \n",
            " 13  Entropy per Block                    56000 non-null  float64\n",
            " 14  Pattern of Repeated Blocks           56000 non-null  int64  \n",
            " 15  Correlation Analysis Between Blocks  56000 non-null  float64\n",
            " 16  Unique Byte Count                    56000 non-null  int64  \n",
            " 17  Compression Ratio of Ciphertext      56000 non-null  float64\n",
            " 18  Run Length Encoding Analysis         56000 non-null  float64\n",
            " 19  Modulus Analysis                     56000 non-null  float64\n",
            " 20  Frequency of High-Entropy Blocks     56000 non-null  int64  \n",
            " 21  Spectral Analysis of Byte Sequences  56000 non-null  float64\n",
            " 22  Algorithm Label                      56000 non-null  object \n",
            "dtypes: float64(13), int64(6), object(4)\n",
            "memory usage: 9.8+ MB\n",
            "None\n",
            "\n",
            "First few rows:\n",
            "   Ciphertext Length                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Byte Frequency Distribution  Byte Entropy  N-gram Bigram Frequency  N-gram Trigram Frequency  Block Size Identification  Padding Scheme Detection  Cipher Mode Patterns  Key Length Identification  Randomness Chi-Square  Randomness KS-Test                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Histogram of Byte Occurrences Bit-level Features  Entropy per Block  Pattern of Repeated Blocks  Correlation Analysis Between Blocks  Unique Byte Count  Compression Ratio of Ciphertext  Run Length Encoding Analysis  Modulus Analysis  Frequency of High-Entropy Blocks  Spectral Analysis of Byte Sequences Algorithm Label\n",
            "0                 20  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]           [81, 79]           1.386294                           5                            -0.069930                  1                             0.05                           1.0               1.0                                 5                        -3.552714e-15           SHA-1\n",
            "1                 20  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]      4.221928                      1.0                       1.0                         20                       NaN                   NaN                        160                  261.6            0.946094  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]           [71, 89]           1.386294                           5                             0.070058                  1                             0.05                           1.0               1.0                                 5                        -7.105427e-15           SHA-1\n",
            "2                 20  [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187  [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]           [85, 75]           1.386294                           5                             0.063811                  1                             0.05                           1.0               1.0                                 5                         1.953993e-14           SHA-1\n",
            "3                 20  [0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187  [0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]           [90, 70]           1.386294                           5                             0.063811                  1                             0.05                           1.0               1.0                                 5                         3.552714e-15           SHA-1\n",
            "4                 20  [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]      4.321928                      1.0                       1.0                         20                       NaN                   NaN                        160                  236.0            0.950000  [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]           [81, 79]           1.386294                           5                            -0.030851                  1                             0.05                           1.0               1.0                                 5                        -7.105427e-15           SHA-1\n",
            "\n",
            "Missing values:\n",
            "Ciphertext Length                          0\n",
            "Byte Frequency Distribution                0\n",
            "Byte Entropy                               0\n",
            "N-gram Bigram Frequency                    0\n",
            "N-gram Trigram Frequency                   0\n",
            "Block Size Identification                  0\n",
            "Padding Scheme Detection               56000\n",
            "Cipher Mode Patterns                   56000\n",
            "Key Length Identification                  0\n",
            "Randomness Chi-Square                      0\n",
            "Randomness KS-Test                         0\n",
            "Histogram of Byte Occurrences              0\n",
            "Bit-level Features                         0\n",
            "Entropy per Block                          0\n",
            "Pattern of Repeated Blocks                 0\n",
            "Correlation Analysis Between Blocks        0\n",
            "Unique Byte Count                          0\n",
            "Compression Ratio of Ciphertext            0\n",
            "Run Length Encoding Analysis               0\n",
            "Modulus Analysis                           0\n",
            "Frequency of High-Entropy Blocks           0\n",
            "Spectral Analysis of Byte Sequences        0\n",
            "Algorithm Label                            0\n",
            "dtype: int64\n"
          ]
        }
      ],
      "source": [
        "import pandas as pd\n",
        "import numpy as np\n",
        "\n",
        "# Load the dataset\n",
        "df = pd.read_csv('/content/test.csv')\n",
        "\n",
        "# Display info about the dataset\n",
        "print(df.info())\n",
        "\n",
        "# Display the first few rows\n",
        "print(\"\\nFirst few rows:\")\n",
        "print(df.head().to_string())\n",
        "\n",
        "# Check for missing values\n",
        "print(\"\\nMissing values:\")\n",
        "print(df.isnull().sum())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 6,
      "id": "7de9532b",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "7de9532b",
        "outputId": "ba4c7398-adc3-4fd5-e214-cce247c8f659"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "List-like columns converted to numerical features.\n",
            "   Ciphertext Length  Byte Entropy  N-gram Bigram Frequency  N-gram Trigram Frequency  Block Size Identification  Padding Scheme Detection  Cipher Mode Patterns  Key Length Identification  Randomness Chi-Square  Randomness KS-Test Bit-level Features  Entropy per Block  Pattern of Repeated Blocks  Correlation Analysis Between Blocks  Unique Byte Count  Compression Ratio of Ciphertext  Run Length Encoding Analysis  Modulus Analysis  Frequency of High-Entropy Blocks  Spectral Analysis of Byte Sequences Algorithm Label  Byte Frequency Distribution_0  Byte Frequency Distribution_1  Byte Frequency Distribution_2  Byte Frequency Distribution_3  Byte Frequency Distribution_4  Byte Frequency Distribution_5  Byte Frequency Distribution_6  Byte Frequency Distribution_7  Byte Frequency Distribution_8  Byte Frequency Distribution_9  Byte Frequency Distribution_10  Byte Frequency Distribution_11  Byte Frequency Distribution_12  Byte Frequency Distribution_13  Byte Frequency Distribution_14  Byte Frequency Distribution_15  Byte Frequency Distribution_16  Byte Frequency Distribution_17  Byte Frequency Distribution_18  Byte Frequency Distribution_19  Byte Frequency Distribution_20  Byte Frequency Distribution_21  Byte Frequency Distribution_22  Byte Frequency Distribution_23  Byte Frequency Distribution_24  Byte Frequency Distribution_25  Byte Frequency Distribution_26  Byte Frequency Distribution_27  Byte Frequency Distribution_28  Byte Frequency Distribution_29  Byte Frequency Distribution_30  Byte Frequency Distribution_31  Byte Frequency Distribution_32  Byte Frequency Distribution_33  Byte Frequency Distribution_34  Byte Frequency Distribution_35  Byte Frequency Distribution_36  Byte Frequency Distribution_37  Byte Frequency Distribution_38  Byte Frequency Distribution_39  Byte Frequency Distribution_40  Byte Frequency Distribution_41  Byte Frequency Distribution_42  Byte Frequency Distribution_43  Byte Frequency Distribution_44  Byte Frequency Distribution_45  Byte Frequency Distribution_46  Byte Frequency Distribution_47  Byte Frequency Distribution_48  Byte Frequency Distribution_49  Byte Frequency Distribution_50  Byte Frequency Distribution_51  Byte Frequency Distribution_52  Byte Frequency Distribution_53  Byte Frequency Distribution_54  Byte Frequency Distribution_55  Byte Frequency Distribution_56  Byte Frequency Distribution_57  Byte Frequency Distribution_58  Byte Frequency Distribution_59  Byte Frequency Distribution_60  Byte Frequency Distribution_61  Byte Frequency Distribution_62  Byte Frequency Distribution_63  Byte Frequency Distribution_64  Byte Frequency Distribution_65  Byte Frequency Distribution_66  Byte Frequency Distribution_67  Byte Frequency Distribution_68  Byte Frequency Distribution_69  Byte Frequency Distribution_70  Byte Frequency Distribution_71  Byte Frequency Distribution_72  Byte Frequency Distribution_73  Byte Frequency Distribution_74  Byte Frequency Distribution_75  Byte Frequency Distribution_76  Byte Frequency Distribution_77  Byte Frequency Distribution_78  Byte Frequency Distribution_79  Byte Frequency Distribution_80  Byte Frequency Distribution_81  Byte Frequency Distribution_82  Byte Frequency Distribution_83  Byte Frequency Distribution_84  Byte Frequency Distribution_85  Byte Frequency Distribution_86  Byte Frequency Distribution_87  Byte Frequency Distribution_88  Byte Frequency Distribution_89  Byte Frequency Distribution_90  Byte Frequency Distribution_91  Byte Frequency Distribution_92  Byte Frequency Distribution_93  Byte Frequency Distribution_94  Byte Frequency Distribution_95  Byte Frequency Distribution_96  Byte Frequency Distribution_97  Byte Frequency Distribution_98  Byte Frequency Distribution_99  Byte Frequency Distribution_100  Byte Frequency Distribution_101  Byte Frequency Distribution_102  Byte Frequency Distribution_103  Byte Frequency Distribution_104  Byte Frequency Distribution_105  Byte Frequency Distribution_106  Byte Frequency Distribution_107  Byte Frequency Distribution_108  Byte Frequency Distribution_109  Byte Frequency Distribution_110  Byte Frequency Distribution_111  Byte Frequency Distribution_112  Byte Frequency Distribution_113  Byte Frequency Distribution_114  Byte Frequency Distribution_115  Byte Frequency Distribution_116  Byte Frequency Distribution_117  Byte Frequency Distribution_118  Byte Frequency Distribution_119  Byte Frequency Distribution_120  Byte Frequency Distribution_121  Byte Frequency Distribution_122  Byte Frequency Distribution_123  Byte Frequency Distribution_124  Byte Frequency Distribution_125  Byte Frequency Distribution_126  Byte Frequency Distribution_127  Byte Frequency Distribution_128  Byte Frequency Distribution_129  Byte Frequency Distribution_130  Byte Frequency Distribution_131  Byte Frequency Distribution_132  Byte Frequency Distribution_133  Byte Frequency Distribution_134  Byte Frequency Distribution_135  Byte Frequency Distribution_136  Byte Frequency Distribution_137  Byte Frequency Distribution_138  Byte Frequency Distribution_139  Byte Frequency Distribution_140  Byte Frequency Distribution_141  Byte Frequency Distribution_142  Byte Frequency Distribution_143  Byte Frequency Distribution_144  Byte Frequency Distribution_145  Byte Frequency Distribution_146  Byte Frequency Distribution_147  Byte Frequency Distribution_148  Byte Frequency Distribution_149  Byte Frequency Distribution_150  Byte Frequency Distribution_151  Byte Frequency Distribution_152  Byte Frequency Distribution_153  Byte Frequency Distribution_154  Byte Frequency Distribution_155  Byte Frequency Distribution_156  Byte Frequency Distribution_157  Byte Frequency Distribution_158  Byte Frequency Distribution_159  Byte Frequency Distribution_160  Byte Frequency Distribution_161  Byte Frequency Distribution_162  Byte Frequency Distribution_163  Byte Frequency Distribution_164  Byte Frequency Distribution_165  Byte Frequency Distribution_166  Byte Frequency Distribution_167  Byte Frequency Distribution_168  Byte Frequency Distribution_169  Byte Frequency Distribution_170  Byte Frequency Distribution_171  Byte Frequency Distribution_172  Byte Frequency Distribution_173  Byte Frequency Distribution_174  Byte Frequency Distribution_175  Byte Frequency Distribution_176  Byte Frequency Distribution_177  Byte Frequency Distribution_178  Byte Frequency Distribution_179  Byte Frequency Distribution_180  Byte Frequency Distribution_181  Byte Frequency Distribution_182  Byte Frequency Distribution_183  Byte Frequency Distribution_184  Byte Frequency Distribution_185  Byte Frequency Distribution_186  Byte Frequency Distribution_187  Byte Frequency Distribution_188  Byte Frequency Distribution_189  Byte Frequency Distribution_190  Byte Frequency Distribution_191  Byte Frequency Distribution_192  Byte Frequency Distribution_193  Byte Frequency Distribution_194  Byte Frequency Distribution_195  Byte Frequency Distribution_196  Byte Frequency Distribution_197  Byte Frequency Distribution_198  Byte Frequency Distribution_199  Byte Frequency Distribution_200  Byte Frequency Distribution_201  Byte Frequency Distribution_202  Byte Frequency Distribution_203  Byte Frequency Distribution_204  Byte Frequency Distribution_205  Byte Frequency Distribution_206  Byte Frequency Distribution_207  Byte Frequency Distribution_208  Byte Frequency Distribution_209  Byte Frequency Distribution_210  Byte Frequency Distribution_211  Byte Frequency Distribution_212  Byte Frequency Distribution_213  Byte Frequency Distribution_214  Byte Frequency Distribution_215  Byte Frequency Distribution_216  Byte Frequency Distribution_217  Byte Frequency Distribution_218  Byte Frequency Distribution_219  Byte Frequency Distribution_220  Byte Frequency Distribution_221  Byte Frequency Distribution_222  Byte Frequency Distribution_223  Byte Frequency Distribution_224  Byte Frequency Distribution_225  Byte Frequency Distribution_226  Byte Frequency Distribution_227  Byte Frequency Distribution_228  Byte Frequency Distribution_229  Byte Frequency Distribution_230  Byte Frequency Distribution_231  Byte Frequency Distribution_232  Byte Frequency Distribution_233  Byte Frequency Distribution_234  Byte Frequency Distribution_235  Byte Frequency Distribution_236  Byte Frequency Distribution_237  Byte Frequency Distribution_238  Byte Frequency Distribution_239  Byte Frequency Distribution_240  Byte Frequency Distribution_241  Byte Frequency Distribution_242  Byte Frequency Distribution_243  Byte Frequency Distribution_244  Byte Frequency Distribution_245  Byte Frequency Distribution_246  Byte Frequency Distribution_247  Byte Frequency Distribution_248  Byte Frequency Distribution_249  Byte Frequency Distribution_250  Byte Frequency Distribution_251  Byte Frequency Distribution_252  Byte Frequency Distribution_253  Byte Frequency Distribution_254  Byte Frequency Distribution_255  Histogram of Byte Occurrences_0  Histogram of Byte Occurrences_1  Histogram of Byte Occurrences_2  Histogram of Byte Occurrences_3  Histogram of Byte Occurrences_4  Histogram of Byte Occurrences_5  Histogram of Byte Occurrences_6  Histogram of Byte Occurrences_7  Histogram of Byte Occurrences_8  Histogram of Byte Occurrences_9  Histogram of Byte Occurrences_10  Histogram of Byte Occurrences_11  Histogram of Byte Occurrences_12  Histogram of Byte Occurrences_13  Histogram of Byte Occurrences_14  Histogram of Byte Occurrences_15  Histogram of Byte Occurrences_16  Histogram of Byte Occurrences_17  Histogram of Byte Occurrences_18  Histogram of Byte Occurrences_19  Histogram of Byte Occurrences_20  Histogram of Byte Occurrences_21  Histogram of Byte Occurrences_22  Histogram of Byte Occurrences_23  Histogram of Byte Occurrences_24  Histogram of Byte Occurrences_25  Histogram of Byte Occurrences_26  Histogram of Byte Occurrences_27  Histogram of Byte Occurrences_28  Histogram of Byte Occurrences_29  Histogram of Byte Occurrences_30  Histogram of Byte Occurrences_31  Histogram of Byte Occurrences_32  Histogram of Byte Occurrences_33  Histogram of Byte Occurrences_34  Histogram of Byte Occurrences_35  Histogram of Byte Occurrences_36  Histogram of Byte Occurrences_37  Histogram of Byte Occurrences_38  Histogram of Byte Occurrences_39  Histogram of Byte Occurrences_40  Histogram of Byte Occurrences_41  Histogram of Byte Occurrences_42  Histogram of Byte Occurrences_43  Histogram of Byte Occurrences_44  Histogram of Byte Occurrences_45  Histogram of Byte Occurrences_46  Histogram of Byte Occurrences_47  Histogram of Byte Occurrences_48  Histogram of Byte Occurrences_49  Histogram of Byte Occurrences_50  Histogram of Byte Occurrences_51  Histogram of Byte Occurrences_52  Histogram of Byte Occurrences_53  Histogram of Byte Occurrences_54  Histogram of Byte Occurrences_55  Histogram of Byte Occurrences_56  Histogram of Byte Occurrences_57  Histogram of Byte Occurrences_58  Histogram of Byte Occurrences_59  Histogram of Byte Occurrences_60  Histogram of Byte Occurrences_61  Histogram of Byte Occurrences_62  Histogram of Byte Occurrences_63  Histogram of Byte Occurrences_64  Histogram of Byte Occurrences_65  Histogram of Byte Occurrences_66  Histogram of Byte Occurrences_67  Histogram of Byte Occurrences_68  Histogram of Byte Occurrences_69  Histogram of Byte Occurrences_70  Histogram of Byte Occurrences_71  Histogram of Byte Occurrences_72  Histogram of Byte Occurrences_73  Histogram of Byte Occurrences_74  Histogram of Byte Occurrences_75  Histogram of Byte Occurrences_76  Histogram of Byte Occurrences_77  Histogram of Byte Occurrences_78  Histogram of Byte Occurrences_79  Histogram of Byte Occurrences_80  Histogram of Byte Occurrences_81  Histogram of Byte Occurrences_82  Histogram of Byte Occurrences_83  Histogram of Byte Occurrences_84  Histogram of Byte Occurrences_85  Histogram of Byte Occurrences_86  Histogram of Byte Occurrences_87  Histogram of Byte Occurrences_88  Histogram of Byte Occurrences_89  Histogram of Byte Occurrences_90  Histogram of Byte Occurrences_91  Histogram of Byte Occurrences_92  Histogram of Byte Occurrences_93  Histogram of Byte Occurrences_94  Histogram of Byte Occurrences_95  Histogram of Byte Occurrences_96  Histogram of Byte Occurrences_97  Histogram of Byte Occurrences_98  Histogram of Byte Occurrences_99  Histogram of Byte Occurrences_100  Histogram of Byte Occurrences_101  Histogram of Byte Occurrences_102  Histogram of Byte Occurrences_103  Histogram of Byte Occurrences_104  Histogram of Byte Occurrences_105  Histogram of Byte Occurrences_106  Histogram of Byte Occurrences_107  Histogram of Byte Occurrences_108  Histogram of Byte Occurrences_109  Histogram of Byte Occurrences_110  Histogram of Byte Occurrences_111  Histogram of Byte Occurrences_112  Histogram of Byte Occurrences_113  Histogram of Byte Occurrences_114  Histogram of Byte Occurrences_115  Histogram of Byte Occurrences_116  Histogram of Byte Occurrences_117  Histogram of Byte Occurrences_118  Histogram of Byte Occurrences_119  Histogram of Byte Occurrences_120  Histogram of Byte Occurrences_121  Histogram of Byte Occurrences_122  Histogram of Byte Occurrences_123  Histogram of Byte Occurrences_124  Histogram of Byte Occurrences_125  Histogram of Byte Occurrences_126  Histogram of Byte Occurrences_127  Histogram of Byte Occurrences_128  Histogram of Byte Occurrences_129  Histogram of Byte Occurrences_130  Histogram of Byte Occurrences_131  Histogram of Byte Occurrences_132  Histogram of Byte Occurrences_133  Histogram of Byte Occurrences_134  Histogram of Byte Occurrences_135  Histogram of Byte Occurrences_136  Histogram of Byte Occurrences_137  Histogram of Byte Occurrences_138  Histogram of Byte Occurrences_139  Histogram of Byte Occurrences_140  Histogram of Byte Occurrences_141  Histogram of Byte Occurrences_142  Histogram of Byte Occurrences_143  Histogram of Byte Occurrences_144  Histogram of Byte Occurrences_145  Histogram of Byte Occurrences_146  Histogram of Byte Occurrences_147  Histogram of Byte Occurrences_148  Histogram of Byte Occurrences_149  Histogram of Byte Occurrences_150  Histogram of Byte Occurrences_151  Histogram of Byte Occurrences_152  Histogram of Byte Occurrences_153  Histogram of Byte Occurrences_154  Histogram of Byte Occurrences_155  Histogram of Byte Occurrences_156  Histogram of Byte Occurrences_157  Histogram of Byte Occurrences_158  Histogram of Byte Occurrences_159  Histogram of Byte Occurrences_160  Histogram of Byte Occurrences_161  Histogram of Byte Occurrences_162  Histogram of Byte Occurrences_163  Histogram of Byte Occurrences_164  Histogram of Byte Occurrences_165  Histogram of Byte Occurrences_166  Histogram of Byte Occurrences_167  Histogram of Byte Occurrences_168  Histogram of Byte Occurrences_169  Histogram of Byte Occurrences_170  Histogram of Byte Occurrences_171  Histogram of Byte Occurrences_172  Histogram of Byte Occurrences_173  Histogram of Byte Occurrences_174  Histogram of Byte Occurrences_175  Histogram of Byte Occurrences_176  Histogram of Byte Occurrences_177  Histogram of Byte Occurrences_178  Histogram of Byte Occurrences_179  Histogram of Byte Occurrences_180  Histogram of Byte Occurrences_181  Histogram of Byte Occurrences_182  Histogram of Byte Occurrences_183  Histogram of Byte Occurrences_184  Histogram of Byte Occurrences_185  Histogram of Byte Occurrences_186  Histogram of Byte Occurrences_187  Histogram of Byte Occurrences_188  Histogram of Byte Occurrences_189  Histogram of Byte Occurrences_190  Histogram of Byte Occurrences_191  Histogram of Byte Occurrences_192  Histogram of Byte Occurrences_193  Histogram of Byte Occurrences_194  Histogram of Byte Occurrences_195  Histogram of Byte Occurrences_196  Histogram of Byte Occurrences_197  Histogram of Byte Occurrences_198  Histogram of Byte Occurrences_199  Histogram of Byte Occurrences_200  Histogram of Byte Occurrences_201  Histogram of Byte Occurrences_202  Histogram of Byte Occurrences_203  Histogram of Byte Occurrences_204  Histogram of Byte Occurrences_205  Histogram of Byte Occurrences_206  Histogram of Byte Occurrences_207  Histogram of Byte Occurrences_208  Histogram of Byte Occurrences_209  Histogram of Byte Occurrences_210  Histogram of Byte Occurrences_211  Histogram of Byte Occurrences_212  Histogram of Byte Occurrences_213  Histogram of Byte Occurrences_214  Histogram of Byte Occurrences_215  Histogram of Byte Occurrences_216  Histogram of Byte Occurrences_217  Histogram of Byte Occurrences_218  Histogram of Byte Occurrences_219  Histogram of Byte Occurrences_220  Histogram of Byte Occurrences_221  Histogram of Byte Occurrences_222  Histogram of Byte Occurrences_223  Histogram of Byte Occurrences_224  Histogram of Byte Occurrences_225  Histogram of Byte Occurrences_226  Histogram of Byte Occurrences_227  Histogram of Byte Occurrences_228  Histogram of Byte Occurrences_229  Histogram of Byte Occurrences_230  Histogram of Byte Occurrences_231  Histogram of Byte Occurrences_232  Histogram of Byte Occurrences_233  Histogram of Byte Occurrences_234  Histogram of Byte Occurrences_235  Histogram of Byte Occurrences_236  Histogram of Byte Occurrences_237  Histogram of Byte Occurrences_238  Histogram of Byte Occurrences_239  Histogram of Byte Occurrences_240  Histogram of Byte Occurrences_241  Histogram of Byte Occurrences_242  Histogram of Byte Occurrences_243  Histogram of Byte Occurrences_244  Histogram of Byte Occurrences_245  Histogram of Byte Occurrences_246  Histogram of Byte Occurrences_247  Histogram of Byte Occurrences_248  Histogram of Byte Occurrences_249  Histogram of Byte Occurrences_250  Histogram of Byte Occurrences_251  Histogram of Byte Occurrences_252  Histogram of Byte Occurrences_253  Histogram of Byte Occurrences_254  Histogram of Byte Occurrences_255\n",
            "0                 20      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187           [81, 79]           1.386294                           5                            -0.069930                  1                             0.05                           1.0               1.0                                 5                        -3.552714e-15           SHA-1                              0                              0                              0                              0                              0                              0                              0                              0                              0                              0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               1                               0                               0                               0                               0                               2                               0                               0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                2                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 2                                 0                                 0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  2                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0\n",
            "1                 20      4.221928                      1.0                       1.0                         20                       NaN                   NaN                        160                  261.6            0.946094           [71, 89]           1.386294                           5                             0.070058                  1                             0.05                           1.0               1.0                                 5                        -7.105427e-15           SHA-1                              0                              0                              0                              0                              0                              0                              0                              0                              0                              0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               2                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 2                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0\n",
            "2                 20      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187           [85, 75]           1.386294                           5                             0.063811                  1                             0.05                           1.0               1.0                                 5                         1.953993e-14           SHA-1                              0                              0                              0                              0                              0                              1                              0                              0                              0                              0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               2                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                1                                1                                0                                0                                1                                1                                0                                2                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                1                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 2                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  1                                  1                                  0                                  0                                  1                                  1                                  0                                  2                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  1                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0\n",
            "3                 20      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187           [90, 70]           1.386294                           5                             0.063811                  1                             0.05                           1.0               1.0                                 5                         3.552714e-15           SHA-1                              0                              0                              0                              0                              0                              1                              0                              2                              0                              0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               1                               1                               1                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                2                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                1                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                2                                0                                0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 1                                 1                                 1                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  2                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0\n",
            "4                 20      4.321928                      1.0                       1.0                         20                       NaN                   NaN                        160                  236.0            0.950000           [81, 79]           1.386294                           5                            -0.030851                  1                             0.05                           1.0               1.0                                 5                        -7.105427e-15           SHA-1                              0                              0                              1                              0                              0                              0                              0                              0                              0                              0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               1                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                               0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                1                                0                                1                                0                                1                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                1                                0                                1                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                0                                1                                0                                0                                0                                1                                0                                0                                0                                0                                0                                0                                0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 1                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                 0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  1                                  0                                  1                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  1                                  0                                  1                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  0                                  1                                  0\n"
          ]
        }
      ],
      "source": [
        "import ast\n",
        "\n",
        "# Convert list-like strings to actual lists\n",
        "list_columns = ['Byte Frequency Distribution', 'Histogram of Byte Occurrences']\n",
        "\n",
        "for column in list_columns:\n",
        "    df[column] = df[column].apply(ast.literal_eval)\n",
        "\n",
        "# Expand the list columns into separate columns\n",
        "for column in list_columns:\n",
        "    list_df = pd.DataFrame(df[column].tolist(), index=df.index)\n",
        "    list_df.columns = [f'{column}_{i}' for i in range(list_df.shape[1])]\n",
        "    df = pd.concat([df.drop(column, axis=1), list_df], axis=1)\n",
        "\n",
        "print('List-like columns converted to numerical features.')\n",
        "print(df.head().to_string())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 7,
      "id": "8906d73d",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "8906d73d",
        "outputId": "84e5f297-4845-4050-ddb8-47e91707d3bc"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "<class 'pandas.core.frame.DataFrame'>\n",
            "RangeIndex: 56000 entries, 0 to 55999\n",
            "Data columns (total 23 columns):\n",
            " #   Column                               Non-Null Count  Dtype  \n",
            "---  ------                               --------------  -----  \n",
            " 0   Ciphertext Length                    56000 non-null  int64  \n",
            " 1   Byte Frequency Distribution          56000 non-null  object \n",
            " 2   Byte Entropy                         56000 non-null  float64\n",
            " 3   N-gram Bigram Frequency              56000 non-null  float64\n",
            " 4   N-gram Trigram Frequency             56000 non-null  float64\n",
            " 5   Block Size Identification            56000 non-null  int64  \n",
            " 6   Padding Scheme Detection             0 non-null      float64\n",
            " 7   Cipher Mode Patterns                 0 non-null      float64\n",
            " 8   Key Length Identification            56000 non-null  int64  \n",
            " 9   Randomness Chi-Square                56000 non-null  float64\n",
            " 10  Randomness KS-Test                   56000 non-null  float64\n",
            " 11  Histogram of Byte Occurrences        56000 non-null  object \n",
            " 12  Bit-level Features                   56000 non-null  object \n",
            " 13  Entropy per Block                    56000 non-null  float64\n",
            " 14  Pattern of Repeated Blocks           56000 non-null  int64  \n",
            " 15  Correlation Analysis Between Blocks  56000 non-null  float64\n",
            " 16  Unique Byte Count                    56000 non-null  int64  \n",
            " 17  Compression Ratio of Ciphertext      56000 non-null  float64\n",
            " 18  Run Length Encoding Analysis         56000 non-null  float64\n",
            " 19  Modulus Analysis                     56000 non-null  float64\n",
            " 20  Frequency of High-Entropy Blocks     56000 non-null  int64  \n",
            " 21  Spectral Analysis of Byte Sequences  56000 non-null  float64\n",
            " 22  Algorithm Label                      56000 non-null  object \n",
            "dtypes: float64(13), int64(6), object(4)\n",
            "memory usage: 9.8+ MB\n",
            "None\n",
            "\n",
            "First few rows:\n",
            "   Ciphertext Length                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Byte Frequency Distribution  Byte Entropy  N-gram Bigram Frequency  N-gram Trigram Frequency  Block Size Identification  Padding Scheme Detection  Cipher Mode Patterns  Key Length Identification  Randomness Chi-Square  Randomness KS-Test                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Histogram of Byte Occurrences Bit-level Features  Entropy per Block  Pattern of Repeated Blocks  Correlation Analysis Between Blocks  Unique Byte Count  Compression Ratio of Ciphertext  Run Length Encoding Analysis  Modulus Analysis  Frequency of High-Entropy Blocks  Spectral Analysis of Byte Sequences Algorithm Label\n",
            "0                 20  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]           [81, 79]           1.386294                           5                            -0.069930                  1                             0.05                           1.0               1.0                                 5                        -3.552714e-15           SHA-1\n",
            "1                 20  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]      4.221928                      1.0                       1.0                         20                       NaN                   NaN                        160                  261.6            0.946094  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]           [71, 89]           1.386294                           5                             0.070058                  1                             0.05                           1.0               1.0                                 5                        -7.105427e-15           SHA-1\n",
            "2                 20  [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187  [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]           [85, 75]           1.386294                           5                             0.063811                  1                             0.05                           1.0               1.0                                 5                         1.953993e-14           SHA-1\n",
            "3                 20  [0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]      4.121928                      1.0                       1.0                         20                       NaN                   NaN                        160                  287.2            0.942187  [0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]           [90, 70]           1.386294                           5                             0.063811                  1                             0.05                           1.0               1.0                                 5                         3.552714e-15           SHA-1\n",
            "4                 20  [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]      4.321928                      1.0                       1.0                         20                       NaN                   NaN                        160                  236.0            0.950000  [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]           [81, 79]           1.386294                           5                            -0.030851                  1                             0.05                           1.0               1.0                                 5                        -7.105427e-15           SHA-1\n",
            "\n",
            "Columns with object dtype:\n",
            "['Byte Frequency Distribution', 'Histogram of Byte Occurrences', 'Bit-level Features', 'Algorithm Label']\n",
            "\n",
            "Sample values from object columns:\n",
            "\n",
            "Byte Frequency Distribution:\n",
            "0    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "1    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "2    [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "3    [0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "4    [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "\n",
            "Histogram of Byte Occurrences:\n",
            "0    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "1    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "2    [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "3    [0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "4    [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...\n",
            "\n",
            "Bit-level Features:\n",
            "0    [81, 79]\n",
            "1    [71, 89]\n",
            "2    [85, 75]\n",
            "3    [90, 70]\n",
            "4    [81, 79]\n",
            "\n",
            "Algorithm Label:\n",
            "0    SHA-1\n",
            "1    SHA-1\n",
            "2    SHA-1\n",
            "3    SHA-1\n",
            "4    SHA-1\n"
          ]
        }
      ],
      "source": [
        "import pandas as pd\n",
        "import numpy as np\n",
        "import ast\n",
        "\n",
        "# Load the dataset\n",
        "df = pd.read_csv('/content/test.csv')\n",
        "\n",
        "# Display info about the dataset\n",
        "print(df.info())\n",
        "\n",
        "# Display the first few rows\n",
        "print(\"\\nFirst few rows:\")\n",
        "print(df.head().to_string())\n",
        "\n",
        "# Check for columns with object dtype\n",
        "object_columns = df.select_dtypes(include=['object']).columns\n",
        "print(\"\\nColumns with object dtype:\")\n",
        "print(object_columns.tolist())\n",
        "\n",
        "# Display a sample of these columns\n",
        "print(\"\\nSample values from object columns:\")\n",
        "for col in object_columns:\n",
        "    print(f\"\\n{col}:\")\n",
        "    print(df[col].head().to_string())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 8,
      "id": "c11791f8",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "c11791f8",
        "outputId": "ecdd9a95-9eca-4701-ad0e-5f5304572f05"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/sklearn/utils/extmath.py:1050: RuntimeWarning: invalid value encountered in divide\n",
            "  updated_mean = (last_sum + new_sum) / updated_sample_count\n",
            "/usr/local/lib/python3.10/dist-packages/sklearn/utils/extmath.py:1055: RuntimeWarning: invalid value encountered in divide\n",
            "  T = new_sum / new_sample_count\n",
            "/usr/local/lib/python3.10/dist-packages/sklearn/utils/extmath.py:1075: RuntimeWarning: invalid value encountered in divide\n",
            "  new_unnormalized_variance -= correction**2 / new_sample_count\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "List-like columns converted, target variable encoded, and features standardized.\n"
          ]
        }
      ],
      "source": [
        "import pandas as pd\n",
        "import numpy as np\n",
        "import ast\n",
        "from sklearn.preprocessing import StandardScaler\n",
        "\n",
        "# Load the dataset\n",
        "df = pd.read_csv('/content/test.csv')\n",
        "# Convert list-like strings to actual lists\n",
        "list_columns = ['Byte Frequency Distribution', 'Histogram of Byte Occurrences', 'Bit-level Features']\n",
        "\n",
        "for column in list_columns:\n",
        "    df[column] = df[column].apply(ast.literal_eval)\n",
        "\n",
        "# Expand the list columns into separate columns\n",
        "for column in list_columns:\n",
        "    list_df = pd.DataFrame(df[column].tolist(), index=df.index)\n",
        "    list_df.columns = [f'{column}_{i}' for i in range(list_df.shape[1])]\n",
        "    df = pd.concat([df.drop(column, axis=1), list_df], axis=1)\n",
        "\n",
        "# Encode the target variable\n",
        "from sklearn.preprocessing import LabelEncoder\n",
        "label_encoder = LabelEncoder()\n",
        "df['Algorithm Label'] = label_encoder.fit_transform(df['Algorithm Label'])\n",
        "\n",
        "# Standardize the numerical features\n",
        "X = df.drop('Algorithm Label', axis=1)\n",
        "y = df['Algorithm Label']\n",
        "\n",
        "scaler = StandardScaler()\n",
        "X_scaled = scaler.fit_transform(X)\n",
        "\n",
        "print('List-like columns converted, target variable encoded, and features standardized.')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 9,
      "id": "4a60d295",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "4a60d295",
        "outputId": "696d7805-dced-4b32-c0d3-a6e9091a2230"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Columns with missing values:\n",
            "Padding Scheme Detection    56000\n",
            "Cipher Mode Patterns        56000\n",
            "dtype: int64\n",
            "\n",
            "Percentage of missing data: 0.38%\n"
          ]
        }
      ],
      "source": [
        "# Check for missing values\n",
        "missing_values = X.isnull().sum()\n",
        "print(\"Columns with missing values:\")\n",
        "print(missing_values[missing_values > 0])\n",
        "\n",
        "# Calculate percentage of missing values\n",
        "total_cells = np.product(X.shape)\n",
        "total_missing = missing_values.sum()\n",
        "print(f\"\\nPercentage of missing data: {(total_missing/total_cells) * 100:.2f}%\")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 10,
      "id": "bb34596c",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "bb34596c",
        "outputId": "e3765828-845d-496c-d6a1-e9884e14422a"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Model trained and evaluated on cleaned data.\n",
            "Accuracy: 0.8535714285714285\n",
            "Classification Report:\n",
            "               precision    recall  f1-score   support\n",
            "\n",
            "           0       1.00      1.00      1.00      1612\n",
            "           1       1.00      1.00      1.00      1638\n",
            "           2       1.00      1.00      1.00      1591\n",
            "           3       0.49      0.49      0.49      1616\n",
            "           4       0.48      0.48      0.48      1566\n",
            "           5       1.00      1.00      1.00      1572\n",
            "           6       1.00      1.00      1.00      1605\n",
            "\n",
            "    accuracy                           0.85     11200\n",
            "   macro avg       0.85      0.85      0.85     11200\n",
            "weighted avg       0.85      0.85      0.85     11200\n",
            "\n"
          ]
        }
      ],
      "source": [
        "from sklearn.model_selection import train_test_split\n",
        "from sklearn.ensemble import RandomForestClassifier\n",
        "from sklearn.metrics import classification_report, accuracy_score\n",
        "from sklearn.preprocessing import StandardScaler\n",
        "# Remove columns with missing values\n",
        "X_cleaned = X.drop(columns=['Padding Scheme Detection', 'Cipher Mode Patterns'])\n",
        "\n",
        "# Re-standardize the cleaned features\n",
        "scaler = StandardScaler()\n",
        "X_scaled_cleaned = scaler.fit_transform(X_cleaned)\n",
        "\n",
        "# Split the cleaned data into training and testing sets\n",
        "X_train_cleaned, X_test_cleaned, y_train, y_test = train_test_split(X_scaled_cleaned, y, test_size=0.2, random_state=42)\n",
        "rf_classifier = RandomForestClassifier(n_estimators=100, random_state=42)\n",
        "\n",
        "# Train the Random Forest Classifier on the cleaned data\n",
        "rf_classifier.fit(X_train_cleaned, y_train)\n",
        "\n",
        "# Make predictions on the cleaned test set\n",
        "y_pred_cleaned = rf_classifier.predict(X_test_cleaned)\n",
        "\n",
        "# Evaluate the model on the cleaned data\n",
        "accuracy_cleaned = accuracy_score(y_test, y_pred_cleaned)\n",
        "report_cleaned = classification_report(y_test, y_pred_cleaned)\n",
        "\n",
        "print('Model trained and evaluated on cleaned data.')\n",
        "print('Accuracy:', accuracy_cleaned)\n",
        "print('Classification Report:\\n', report_cleaned)"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.model_selection import cross_val_score\n",
        "\n",
        "# Perform k-fold cross-validation\n",
        "k = 5\n",
        "cv_scores = cross_val_score(rf_classifier, X_scaled_cleaned, y, cv=k, scoring='accuracy')\n",
        "\n",
        "print('Cross-validation scores:', cv_scores)\n",
        "print('Mean cross-validation accuracy:', cv_scores.mean())"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "38-7O-4hRuEB",
        "outputId": "9af73f6f-3bc8-4ecc-9bcd-0d7a44f6bdab"
      },
      "id": "38-7O-4hRuEB",
      "execution_count": 11,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Cross-validation scores: [0.85133929 0.85446429 0.85839286 0.855      0.85616071]\n",
            "Mean cross-validation accuracy: 0.8550714285714287\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "import matplotlib.pyplot as plt\n",
        "from sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay\n",
        "from sklearn.model_selection import learning_curve\n",
        "import seaborn as sns\n",
        "\n",
        "# Confusion Matrix\n",
        "cm = confusion_matrix(y_test, y_pred_cleaned)\n",
        "disp = ConfusionMatrixDisplay(confusion_matrix=cm)\n",
        "disp.plot(cmap='viridis')\n",
        "plt.title('Confusion Matrix')\n",
        "plt.savefig('confusion_matrix.png')\n",
        "plt.close()\n",
        "\n",
        "# Learning Curves\n",
        "train_sizes, train_scores, test_scores = learning_curve(\n",
        "    rf_classifier, X_scaled_cleaned, y, cv=5, n_jobs=-1,\n",
        "    train_sizes=np.linspace(0.1, 1.0, 10), scoring='accuracy'\n",
        ")\n",
        "\n",
        "train_mean = np.mean(train_scores, axis=1)\n",
        "train_std = np.std(train_scores, axis=1)\n",
        "test_mean = np.mean(test_scores, axis=1)\n",
        "test_std = np.std(test_scores, axis=1)\n",
        "\n",
        "plt.figure(figsize=(10, 6))\n",
        "plt.plot(train_sizes, train_mean, label='Training score')\n",
        "plt.plot(train_sizes, test_mean, label='Cross-validation score')\n",
        "plt.fill_between(train_sizes, train_mean - train_std, train_mean + train_std, alpha=0.1)\n",
        "plt.fill_between(train_sizes, test_mean - test_std, test_mean + test_std, alpha=0.1)\n",
        "plt.xlabel('Number of training examples')\n",
        "plt.ylabel('Accuracy score')\n",
        "plt.title('Learning Curves')\n",
        "plt.legend(loc='best')\n",
        "plt.savefig('learning_curves.png')\n",
        "plt.close()\n",
        "\n",
        "print(\"Confusion matrix and learning curves have been generated and saved.\")"
      ],
      "metadata": {
        "id": "2QE2ubnqTsAa",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "6e0174c9-f032-4db4-d734-6281de2ee3af"
      },
      "id": "2QE2ubnqTsAa",
      "execution_count": 12,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Confusion matrix and learning curves have been generated and saved.\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# GBM\n",
        "import pandas as pd\n",
        "import numpy as np\n",
        "import ast\n",
        "from sklearn.preprocessing import StandardScaler, LabelEncoder\n",
        "from sklearn.model_selection import train_test_split, cross_val_score\n",
        "from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier\n",
        "from sklearn.svm import SVC\n",
        "from sklearn.metrics import classification_report, accuracy_score, confusion_matrix, ConfusionMatrixDisplay\n",
        "import matplotlib.pyplot as plt\n",
        "from sklearn.model_selection import learning_curve\n",
        "from sklearn.impute import SimpleImputer\n",
        "\n",
        "# Load and preprocess the dataset\n",
        "df = pd.read_csv('/content/test.csv')\n",
        "\n",
        "# Convert list-like strings to actual lists\n",
        "list_columns = ['Byte Frequency Distribution', 'Histogram of Byte Occurrences', 'Bit-level Features']\n",
        "for column in list_columns:\n",
        "    df[column] = df[column].apply(ast.literal_eval)\n",
        "\n",
        "# Expand the list columns into separate columns\n",
        "for column in list_columns:\n",
        "    list_df = pd.DataFrame(df[column].tolist(), index=df.index)\n",
        "    list_df.columns = [f'{column}_{i}' for i in range(list_df.shape[1])]\n",
        "    df = pd.concat([df.drop(column, axis=1), list_df], axis=1)\n",
        "\n",
        "# Encode the target variable\n",
        "label_encoder = LabelEncoder()\n",
        "df['Algorithm Label'] = label_encoder.fit_transform(df['Algorithm Label'])\n",
        "\n",
        "# Standardize the numerical features\n",
        "X = df.drop('Algorithm Label', axis=1)\n",
        "y = df['Algorithm Label']\n",
        "scaler = StandardScaler()\n",
        "X_scaled = scaler.fit_transform(X)\n",
        "\n",
        "imputer = SimpleImputer(strategy='mean') # Replace NaNs with the mean of each column\n",
        "X_scaled = imputer.fit_transform(X_scaled)\n",
        "# Split the data into training and testing sets\n",
        "X_train, X_test, y_train, y_test = train_test_split(X_scaled, y, test_size=0.2, random_state=42)\n",
        "\n",
        "# Initialize and train the GBM model\n",
        "gbm_classifier = GradientBoostingClassifier(n_estimators=100, random_state=42)\n",
        "gbm_classifier.fit(X_train, y_train)\n",
        "\n",
        "# Make predictions on the test set\n",
        "y_pred = gbm_classifier.predict(X_test)\n",
        "\n",
        "# Evaluate the GBM model\n",
        "accuracy = accuracy_score(y_test, y_pred)\n",
        "report = classification_report(y_test, y_pred)\n",
        "\n",
        "print('GBM Model trained and evaluated.')\n",
        "print('Accuracy:', accuracy)\n",
        "print('Classification Report:\\n', report)\n",
        "\n",
        "# Perform k-fold cross-validation\n",
        "cv_scores = cross_val_score(gbm_classifier, X_scaled, y, cv=5, scoring='accuracy')\n",
        "print('Cross-validation scores:', cv_scores)\n",
        "print('Mean cross-validation accuracy:', cv_scores.mean())\n",
        "\n",
        "# Confusion Matrix\n",
        "cm = confusion_matrix(y_test, y_pred)\n",
        "disp = ConfusionMatrixDisplay(confusion_matrix=cm)\n",
        "disp.plot(cmap='viridis')\n",
        "plt.title('Confusion Matrix for GBM')\n",
        "plt.savefig('confusion_matrix_gbm.png')\n",
        "plt.close()\n",
        "\n",
        "# Learning Curves\n",
        "train_sizes, train_scores, test_scores = learning_curve(\n",
        "    gbm_classifier, X_scaled, y, cv=5, n_jobs=-1,\n",
        "    train_sizes=np.linspace(0.1, 1.0, 10), scoring='accuracy'\n",
        ")\n",
        "\n",
        "train_mean = np.mean(train_scores, axis=1)\n",
        "train_std = np.std(train_scores, axis=1)\n",
        "test_mean = np.mean(test_scores, axis=1)\n",
        "test_std = np.std(test_scores, axis=1)\n",
        "\n",
        "plt.figure(figsize=(10, 6))\n",
        "plt.plot(train_sizes, train_mean, label='Training score')\n",
        "plt.plot(train_sizes, test_mean, label='Cross-validation score')\n",
        "plt.fill_between(train_sizes, train_mean - train_std, train_mean + train_std, alpha=0.1)\n",
        "plt.fill_between(train_sizes, test_mean - test_std, test_mean + test_std, alpha=0.1)\n",
        "plt.xlabel('Number of training examples')\n",
        "plt.ylabel('Accuracy score')\n",
        "plt.title('Learning Curves for GBM')\n",
        "plt.legend(loc='best')\n",
        "plt.savefig('learning_curves_gbm.png')\n",
        "plt.close()\n",
        "\n",
        "print(\"Confusion matrix and learning curves for GBM have been generated and saved.\")\n"
      ],
      "metadata": {
        "id": "1SuMw-AVU4pk",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "849d9c97-16f6-4178-b8f0-91fa17393021"
      },
      "id": "1SuMw-AVU4pk",
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/sklearn/utils/extmath.py:1050: RuntimeWarning: invalid value encountered in divide\n",
            "  updated_mean = (last_sum + new_sum) / updated_sample_count\n",
            "/usr/local/lib/python3.10/dist-packages/sklearn/utils/extmath.py:1055: RuntimeWarning: invalid value encountered in divide\n",
            "  T = new_sum / new_sample_count\n",
            "/usr/local/lib/python3.10/dist-packages/sklearn/utils/extmath.py:1075: RuntimeWarning: invalid value encountered in divide\n",
            "  new_unnormalized_variance -= correction**2 / new_sample_count\n",
            "/usr/local/lib/python3.10/dist-packages/sklearn/impute/_base.py:558: UserWarning: Skipping features without any observed values: [5 6]. At least one non-missing value is needed for imputation with strategy='mean'.\n",
            "  warnings.warn(\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "Xd9hMFRs_fNi"
      },
      "id": "Xd9hMFRs_fNi",
      "execution_count": null,
      "outputs": []
    }
  ],
  "metadata": {
    "colab": {
      "provenance": [],
      "gpuType": "V28"
    },
    "language_info": {
      "name": "python"
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "accelerator": "TPU"
  },
  "nbformat": 4,
  "nbformat_minor": 5
}